home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 2 / BBS in a box - Trilogy II.iso / Files / Newton / Util / Sam's Sleeper 1.00 / READ ME next >
Encoding:
Text File  |  1993-10-23  |  2.8 KB  |  69 lines  |  [TEXT/ttxt]

  1. October 23, 1993
  2.  
  3. Sam's Sensable Sleeper V1.00
  4.  
  5. Brought to you by:
  6.  
  7. Sam's Software Shoppe
  8.  
  9. This package is shareware, if you use it
  10. you are requested to send $5 to 
  11.  
  12. Sam's Software Shoppe
  13. 220 W. Bell Rd., #2057
  14. Phoenix, AZ  85023
  15.  
  16. comments to:  riedesel@inference.com
  17.  
  18. What is it?
  19. ----------
  20. Sam's Sensable Sleeper, when turned on, detects whether you are operating
  21. by plug or by battery.  You may then set the sleep time on your Newton based
  22. on whether you are using the plug or the battery.  Thus, if most of the time
  23. you use the plug (at your office where your plug is, perhaps), you can set sleep
  24. to never.  When you then carry it around off the plug, you can have the sleep be,
  25. say, 1 minute.  This way, you don't have to always dive through a zillion menus
  26. just to reset the sleep.  You do it once with this package and the package will
  27. do it for you from then on (if you turn it on).
  28.  
  29. How does it work?
  30. -----------------
  31. Ugh.  Via a couple of hacks.
  32. By setting trace to 'functions, I was able to find the function "BatteryLevel(0)"
  33. which returns an integer between 0 and 100.  So, if the value ever goes below
  34. 100, then I assume we don't have a plug (probably a safe assumption).
  35. Unfortunately, while the battery is fresh, I don't know if you have a plug or
  36. a battery.  Anyone know a better way to detect if the Newton is plugged in?
  37.  
  38. The second thing is a viewIdleScript.  This seems to require that the view remain
  39. open in order to keep the idle script going.  Therefore, I hide the view instead
  40. of closing it when the close box is tapped.  Well, then I only want to show it when
  41. the icon for the package is tapped.  Easier said than done.  Ever try to change the 
  42. buttonClickScript on those views in the ExtrasDrawer?  Everytime the drawer
  43. is closed those views are gone.  Now what?  So my viewIdleScript also tries to
  44. keep the buttonClickScript up to date.
  45.  
  46. The upshot of this is that I have the viewIdleScript running every second.  This is
  47. so that the buttonClickScript is set appropriately before the user really has
  48. a chance to get to it.  
  49.  
  50. One shouldn't have to go through these contortions to do something simple like
  51. this?  If anyone can recommend how to do what I'm really trying to do, please,
  52. tell me.
  53. It bugs me that the code is really quite simple; but to get it to work the way I
  54. think it should be able to on the Newton is less than trivial (understatement).
  55.  
  56. Recommendations
  57. ----------------
  58. Sam's Software Shoppe recommends that you install this package
  59. in your internal memory rather than on a card or other storage device.
  60. The package is simple in concept, but difficult to implement and thus
  61. won't allow you to remove external storage if you install it on external
  62. storage.
  63.  
  64. Caveats
  65. -------
  66. Sam's Software Shoppe makes no guarantees regarding this product.
  67. Sam's Software Shoppe is not responsible for any loss resulting from the
  68. use of this product.
  69.